home *** CD-ROM | disk | FTP | other *** search
- Path: cs.mu.OZ.AU!bounce-back
- From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
- Newsgroups: comp.std.c++
- Subject: Re: typedef not strong
- Date: 20 Feb 96 04:56:37 GMT
- Organization: Comp Sci, University of Melbourne
- Approved: fjh@cs.mu.oz.au
- Message-ID: <4g8vdo$igt@mulga.cs.mu.OZ.AU>
- References: <4g5sm4$dtt@natasha.rmii.com>
- NNTP-Posting-Host: munta.cs.mu.oz.au
- X-Original-Date: 19 Feb 1996 04:47:52 GMT
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBFAgUBMSlUlOEDnX0m9pzZAQE3SgF/b+SbjU//HGCAaqenJTb9heudruKoIjOr
- lHZu9zQFpcB5SUivDYk6uN+xX5B2gbQz
- =lcsr
- Originator: fjh@munta.cs.mu.OZ.AU
-
- rpayne@rainbow.rmii.com (Robert Payne) writes:
-
- >Why has C++ stayed with the weak typedef? It has always seemed to
- >me that it should provide a new type and not just a synomym. Some
- >lints check for strong typing but I haven't found a compiler that
- >will enforce it. I know this must have been debated at some point
- >but I didn't find it in a FAQ. Could someone please enlighten me?
-
- If typedef were to create a new type, what operations would be allowed
- on the new type?
-
- I think that changing the meaning of `typedef' would be a bad idea.
- It might make sense to propose a new construct, say `newtypedef', that
- did something different, but C++ already has a way to create new types
- (`class'), and it is not at all clear that adding a new way would be
- worth the additional complexity.
-
- --
- Fergus Henderson WWW: http://www.cs.mu.oz.au/~fjh
- fjh@cs.mu.oz.au PGP: finger fjh@128.250.37.3
- ---
- [ To submit articles: try just posting with your news-reader.
- If that fails, use mailto:std-c++@ncar.ucar.edu
- FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
- Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
- Comments? mailto:std-c++-request@ncar.ucar.edu.
- ]
-